package net.tv90.bfmccoreqqbot.api.interceptor;

import net.tv90.bfmccoreqqbot.api.HandlerInterceptor;
import net.tv90.bfmccoreqqbot.api.WebSocketClientInitializer;
import net.tv90.bfmccoreqqbot.api.entity.MessageContext;

public class QqGroupInterceptor implements HandlerInterceptor {

    @Override
    public boolean preHandle(MessageContext message) {
        for (String s : WebSocketClientInitializer.config.getQqGroup()) {
            if (s.equals(message.getSenderGroupQq())) {
                return true;
            }
        }
        return false;
    }

    @Override
    public void postHandle(MessageContext message) {

    }
}
